#include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;



unordered_set<int> row, col, zx, fx;

int main() {
    int k;
    cin >> k;
    vector<int> flg(k + 1, true);
    for (int i = 1; i <= k; i++) {
        int x, y;
        cin >> x >> y;
        if (row.count(x) || col.count(y) || zx.count(x - y) || fx.count(x + y) || flg[i-1]==false) {
            flg[i] = false;
            continue;
        }
        row.insert(x);
        col.insert(y);
        zx.insert(x - y);
        fx.insert(x + y);
    }
    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        int x;
        cin >> x;
        if (!flg[x]) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
    return 0;
}
